<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>


<style>
    h1 {
        text-align: center;
    }

    h2 {
        text-align: left;
    }

    h3 {
        text-align: right;
    }
</style>


<body>
    <h1>标题 1（居中对齐）</h1>
    <h2>标题 2（左对齐）</h2>
    <h3>标题 3（右对齐）</h3>
    <p>上面的三个标题是居中、左和右对齐。</p>
</body>

</html>